import java.util.Arrays;
import java.util.List;

import static java.util.stream.Collectors.toList;

public class TestBook {
    public static void main(String[] args) {
        List<Book> books = Arrays.asList(
                new Book("a",145),
                new Book("b",105),
                new Book("c",160),
                new Book("d",80),
                new Book("e",120),
                new Book("f",65),
                new Book("g",98));

        List<String> lowCaloriesDishName=books.stream()
                .filter(d->d.getPrice()<100)
                .sorted((d1,d2)->d1.getPrice()-d2.getPrice())
                .map(d->d.getName())
                .collect(toList());

        for(String name:lowCaloriesDishName)
            System.out.println(name);
    }
}
